<SCRIPT language="JavaScript1.2" src="js/Boot.js" type="text/javascript"></SCRIPT>
<!--分类弹出窗口js-->
<img src="images/selectTxt.gif" name="two-tabs|he|all-categories" style="cursor:pointer" align="absmiddle"> 
<!--分类弹出窗口开始-->
<DIV style="display:none;">
<DIV id="all-categories">
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: -1px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: -1px; PADDING-BOTTOM: 0px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 300px; PADDING-TOP: 1px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #ffffff">
									
<table class="cTable table tCenter">
	<tr class="cTitle toolbarBg" id="Title">
		<td style="padding:0 15px"><div class="left">类别筛选</div><div class="right"><a href="?">显示所有</a></div></td>
	</tr>
</table>									
<%
Set rstotal = Server.CreateObject("ADODB.Recordset")
sqltotal="select * from ProductClass order by px desc,id desc"
rstotal.open sqltotal,conn,1,1
totalnum=rstotal.recordcount
rstotal.close
set rstotal=nothing

Set rsB = Server.CreateObject("ADODB.Recordset")
sqlB="select * from ProductClass where ParentClassID = 0 order by px desc,id desc"
rsB.open sqlB,conn,1,1
%>
<div id="classcontent1" <%if totalnum>12 then response.Write("style='height:350px; overflow:auto'")%>>
<table class="cTable table tCenter">
<script language="javascript" id="clientEventHandlersJS">
var number=<%=rsB.recordcount%>;
function LMYC(){
	for (i=1;i<=number;i++){
        document.getElementById('LM' + i).style.display = 'none';
    }
}
function ShowFLT(i) {
	var lbmc;
    lbmc=document.getElementById('LM' + i);
    if(lbmc.style.display == 'none'){
        LMYC();
        lbmc.style.display = '';
    }
    else{
        lbmc.style.display = 'none';
    }
}
</script>
<%
for i=1 to rsB.recordcount
if rsB.eof then
exit for
end if
str=rsB("ClassName")


Set rs1 = Server.CreateObject("ADODB.Recordset")
sql1="select * from ProductClass where ParentClassID = "& rsB("ID") &" order by px desc,id desc"
rs1.open sql1,conn,1,1
%>
	<tr class="trSelectList" onMouseOver="this.className='trSelectListHover'" onMouseOut="this.className='trSelectList'">
		<td align="left">
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr>
			<%if rs1.recordcount=0 then%>
				<td style="border-bottom: none; padding-left:10px" >
					<a href="?oneclassid=<%=rsb("ID")%>" title="<%=str%>"><b><%=gotTopic(str,33)%></b></a>
				</td>
			<%else%>
					<td style="border-bottom: none; padding-left:10px">
				<a onclick="ShowFLT(<%=i%>)" href="javascript:void(null)" title="<%=str%>"><b><%=gotTopic(str,33)%></b></a>
					</td>
					<td align="right" style="border-bottom: none; padding-right:10px"><a href="?oneclassid=<%=rsb("ID")%>">筛选该类</a></td>
			<%end if%>
				</tr>
			</table>
		</td>
	</tr>
	
	<tr id="LM<%=i%>" style="display: none;">
		<td>
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
			<%			   
			   for j=1 to rs1.recordcount
			   if rs1.eof then
			   exit for
			   end if
			   str1=rs1("ClassName")
				 
			   Set rs2 = Server.CreateObject("ADODB.Recordset")
			   sql2="select * from ProductClass where ParentClassID = "& rs1("ID") &" order by px desc,id desc"
			   rs2.open sql2,conn,1,1
			 %>
		
			<tr class="trSelectList" onMouseOver="this.className='trSelectListHover'" onMouseOut="this.className='trSelectList'">
				<td align="left" style="padding-left:20px">+ <a href="?oneclassid=<%=rsb("ID")%>&twoclassid=<%=rs1("ID")%>" title="<%=str%>"><%=gotTopic(str1,33)%></a>
				</td>
			</tr>
		
			<%
			   for k=1 to rs2.recordcount
			   if rs2.eof then
			   exit for
			   end if
			   str2=rs2("ClassName")
			   
			   Set rs3 = Server.CreateObject("ADODB.Recordset")
			   sql3="select * from ProductClass where ParentClassID = "& rs2("ID") &" order by px desc,id desc"
			   rs3.open sql3,conn,1,1
			 %>
		
			<tr class="trSelectList" onMouseOver="this.className='trSelectListHover'" onMouseOut="this.className='trSelectList'">
				<td align="left"  style="padding-left:30px">- <a href="?oneclassid=<%=rsb("ID")%>&twoclassid=<%=rs1("ID")%>&threeclassid=<%=rs2("ID")%>" title="<%=str%>"><%=gotTopic(str2,33)%></a>
				</td>
			</tr>
			
			
			<%
			   for w=1 to rs3.recordcount
			   if rs3.eof then
			   exit for
			   end if
			   str3=rs3("ClassName")
			   Set rs4 = Server.CreateObject("ADODB.Recordset")
			   sql4="select * from ProductClass where ParentClassID = "& rs3("ID") &" order by px desc,id desc"
			   rs4.open sql4,conn,1,1
			%>
			<tr class="trSelectList" onMouseOver="this.className='trSelectListHover'" onMouseOut="this.className='trSelectList'">
				<td align="left" style="padding-left:40px">· <a  href="?oneclassid=<%=rsb("ID")%>&twoclassid=<%=rs1("ID")%>&threeclassid=<%=rs2("ID")%>&fourclassid=<%=rs3("ID")%>" title="<%=str3%>"><%=gotTopic(str3,33)%></a>
				</td>
			</tr>
			
			<%
			for wx=1 to rs4.recordcount
			if rs4.eof then
			exit for
			end if
			str4=rs4("ClassName")
			%>
			<tr class="trSelectList" onMouseOver="this.className='trSelectListHover'" onMouseOut="this.className='trSelectList'">
				<td align="left" style="padding-left:50px">› <a href="?oneclassid=<%=rsb("ID")%>&twoclassid=<%=rs1("ID")%>&threeclassid=<%=rs2("ID")%>&fourclassid=<%=rs3("ID")%>&fiveclassid=<%=rs4("id")%>" title="<%=str4%>"><%=gotTopic(str4,33)%></a>
				</td>
			</tr>
		
			<%
			rs4.movenext
			next
			rs4.close
			set rs4=nothing
			%>
			
			<%
				rs3.movenext
				next
				rs3.close
				set rs3=nothing
			%>
		
			<%
				rs2.movenext
				next
				rs2.close
				set rs2=nothing
			%>
			
			<%
				rs1.movenext
				next
				rs1.close
				set rs1=nothing
			%>
			</table>
		</td>
	</tr>
<%
rsB.movenext
next
rsB.close
Set rsB=nothing
%>
</table> 
</div>
									
</DIV></DIV></DIV>
<!--分类弹出窗口结束-->